package cn.iocoder.yudao.module.trade.delivery.vo;

import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.framework.validation.PhoneNumber;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalTime;

/**
 * 自提门店 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class DeliveryPickUpStoreBaseVO {

    @Schema(description = "店铺编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23128")
    private Long shopId;

    @Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotBlank(message = "门店名称不能为空")
    private String name;

    @Schema(description = "门店简介", example = "我是门店简介")
    private String introduction;

    @Schema(description = "门店电话", requiredMode = Schema.RequiredMode.REQUIRED, example = "1528516029")
    @NotBlank(message = "门店电话不能为空")
    @PhoneNumber
    private String phone;

    @Schema(description = "区域编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18733")
    @NotNull(message = "区域编号不能为空")
    private Integer areaId;

    @Schema(description = "门店详细地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "复旦大学路 188 号")
    @NotBlank(message = "门店详细地址不能为空")
    private String detailAddress;

    @Schema(description = "门店徽标", example = "https://exmaple.local/1.png")
    private String logo;

    @Schema(description = "营业开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
    private LocalTime openingTime;

    @Schema(description = "营业结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
    private LocalTime closingTime;

    @Schema(description = "纬度", example = "5.88")
    private Double latitude;

    @Schema(description = "经度", example = "6.99")
    private Double longitude;

    @Schema(description = "门店状态", example = "1")
    @InEnum(CommonStatusEnum.class)
    private Integer status;

}
